﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Media;
using System.Windows.Media.Animation;

namespace PuzzleCommon
{
    public static class Utils
    {
        static LinearGradientBrush linearGradientBrush;
        public static string downloadedImagesXMLFilename = "downloadedImages.xml";
        static Utils()
        {
            linearGradientBrush = new LinearGradientBrush();
            linearGradientBrush.GradientStops.Add(new GradientStop(Colors.LightSeaGreen, 0.3));

            GradientStop lightBlueGradient = new GradientStop(Colors.LightBlue, 0.4);
            

            DoubleAnimation animation = new DoubleAnimation();
            animation.Duration = TimeSpan.FromSeconds(30);
            animation.From = 0.4;
            animation.To = 0.8;
            animation.RepeatBehavior = RepeatBehavior.Forever;
            animation.AutoReverse = true;

            lightBlueGradient.BeginAnimation(GradientStop.OffsetProperty, animation);

            linearGradientBrush.GradientStops.Add(lightBlueGradient);



            linearGradientBrush.GradientStops.Add(new GradientStop(Colors.Purple, 0.9));
        
        }
        public static LinearGradientBrush GetLinearBrushAnimation()
        {
            return linearGradientBrush;
        }
    }
}
